pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let parts: Vec<&str> = num_str.split('(').collect();
    let number_str = parts[0];
    let base: u32 = parts[1].trim_matches(')').parse().expect("Invalid base");
    let mut num: u32 = u32::from_str_radix(number_str, base).expect("Invalid number");
    let mut result = String::new();
    while num > 0 {
        let remainder = num % to_base;
        let digit_char = std::char::from_digit(remainder, to_base).unwrap();
        result.push(digit_char);
        num /= to_base;
    }
    result.chars().rev().collect()
}
